# Contributor: Patrycja Rosa <alpine@ptrcnull.me>
# Maintainer: Patrycja Rosa <alpine@ptrcnull.me>
pkgname=py3-dep-logic
pkgver=0.0.4
pkgrel=0
pkgdesc="Python dependency specifications supporting logical operations"
url="https://github.com/pdm-project/dep-logic"
arch="noarch"
license="Apache-2.0"
depends="py3-packaging"
makedepends="py3-gpep517 py3-pdm-backend py3-wheel"
checkdepends="py3-pytest"
subpackages="$pkgname-pyc"
source="https://github.com/pdm-project/dep-logic/archive/$pkgver/py3-dep-logic-$pkgver.tar.gz"
builddir="$srcdir/dep-logic-$pkgver"

build() {
	export PDM_BUILD_SCM_VERSION=$pkgver
	gpep517 build-wheel \
		--wheel-dir .dist \
		--output-fd 3 3>&1 >&2
}

check() {
	python3 -m venv --clear --without-pip --system-site-packages .testenv
	.testenv/bin/python3 -m installer .dist/*.whl
	.testenv/bin/python3 -m pytest
}

package() {
	python3 -m installer -d "$pkgdir" \
		.dist/*.whl
}

sha512sums="
2d503f04c88ddf024a126c4dfa7fb97ee596ab1f02ef5cc159987acd399fc3caecb19d38c808032f1eeeeacc7c3eca9e589beb7bf3ec0d71c72e826de9220a0c  py3-dep-logic-0.0.4.tar.gz
"
